package edu.cque.jt.common.net;

import java.io.IOException;
import java.io.InputStream;
import java.net.Socket;

/**
 * @author Hua
 * @create 2022-07-20 15:59
 */
public class MySocket {
    public static void main(String[] args) throws IOException {
        Socket socket = new Socket("127.0.0.1",9999);
        InputStream inputStream = socket.getInputStream();
        byte[] buffer = new byte[1024];
        int len = inputStream.read(buffer);
        System.out.println(new String(buffer,0, len));
        socket.close();
    }
}
